import Vue from 'vue'
import VueRouter from 'vue-router'
const Home = () =>
    import ('@/views/home/index.vue')
const Question = () =>
    import ('@/views/question/index.vue')
const Video = () =>
    import ('@/views/video/index.vue')
const User = () =>
    import ('@/views/user/index.vue')
const Chat = () =>
    import ('@/views/user/chat.vue')
const Profile = () =>
    import ('@/views/user/Profile.vue')
const Articles = () =>
    import ('@/views/articles/index.vue')
import ('@/views/articles/index.vue')
const Tabbar = () =>
    import ('@/components/app-tabbar.vue')
Vue.use(VueRouter)

const routes = [{
        path: '/',
        alias: '/home',
        components: {
            default: Home,
            bottom: Tabbar
        }
    },
    {
        path: '/video',
        components: {
            default: Video,
            bottom: Tabbar
        }
    },
    {
        path: '/question',
        components: {
            default: Question,
            bottom: Tabbar
        }
    },
    {
        path: '/user',
        components: {
            default: User,
            bottom: Tabbar
        }
    },
    {
        path: '/user/chat',
        component: Chat
    },
    {
        path: '/user/Profile',
        component: Profile
    },
    {
        path: '/articles',
        components: {
            default: Articles
        }
    }
]

const router = new VueRouter({
    routes
})

export default router